package com.clound.order.exception;

import com.clound.order.enums.ResultEnum;

/**
 * Created by zzy on 2018/4/7.
 */
public class OrderException extends RuntimeException {

    private int code;

    private String message;

    public OrderException( int code,String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
    public OrderException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMessage();
    }
}
